Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODShape


CopyPolygon

The CopyPolygon method returns a copy of this shape's geometric representation, expressed as a polygon.

void CopyPolygon (out ODPolygon copy);
copy
A structure whose fields are set to represent a polygon that describes this shape's geometric representation, or an empty polygon if this shape's geometric representation cannot be represented by a polygon.
DISCUSSION
To check whether the shape's geometric representation can be described by a polygon, call the HasGeometry method. Note that some geometric representations, such as curves, can only be approximated by a polygon.

The polygon returned in the copy output parameter is not owned by this shape; you are allowed to modify it. When you no longer need the polygon, you should deallocate its storage.

EXCEPTIONS
kODErrNoShapeGeometry
This shape has no geometric representation, so it cannot be described as a polygon.
kODErrOutOfMemory
There is not enough memory to copy this shape's geometric representation.
SEE ALSO
The ODPolygon type (page 886).
The ODShape::HasGeometry method (page 641).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help